﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Customer.Bussiness_Service;
using Entity;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using ServiceCore;

namespace Customer.Areas.System.Controllers
{
    [ApiController, Area("System"), Route("/[action].do")]
    public class loginController : ControllerBase
    {
        private readonly Ilogin_service _service;
        private readonly IToole_DI _tool;
        public loginController(Ilogin_service service, IToole_DI tool)
        {
            _service = service;
            _tool = tool;
        }
        /// <summary>
        /// 获取菜单列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        [HttpPost]
        public ResultObjModel Login(LoginParams query)
        {
            var result = _service.Login(query);
            return result;
        }

        /// <summary>
        /// 获取菜单列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        [HttpPost]
        public ResultObjModel WxLogin(WxLoginParams query)
        {
            var result = _service.LoginForWx(query);
            return result;
        }
    }
}